﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VAdvantage.DataBase;
using VAdvantage.Utility;

namespace VAdvantageWeb
{
    public partial class CampaignMaster : System.Web.UI.MasterPage, IBackInt
    {
        #region Private Variables
        string sql = "";
        int C_InviteeList_ID = 0;
        #endregion
        public string txt = "";
        public string color = "";
        public string formcolor = "";
        public string header = "";
        public string footer = "";
        public string imgpath = System.Web.VirtualPathUtility.ToAbsolute("~/Images/Penguins.jpg");
        protected void Page_Load(object sender, EventArgs e)
        {
            string url = HttpContext.Current.Request.Url.ToString();
            sql = "select c_inviteelist_id from c_inviteelist where url = '" + url + "'";
            C_InviteeList_ID = Util.GetValueOfInt(DB.ExecuteScalar(sql, null, null));
            if (C_InviteeList_ID != 0)
            {
                sql = "select name from c_campaign where c_campaign_id = "
                    + " (select C_Campaign_id from c_inviteelist where c_inviteelist_id = " + C_InviteeList_ID + ")";
                string name = (DB.ExecuteScalar(sql, null, null)).ToString();
                //lblCampaign.Text = name;
            }
            else
            {
               // lblCampaign.Text = "NotInviteeURL";
            }
           
        }

        #region IBackInt Members

        public string HTML
        {
            get { return this.txt; }
            set { this.txt = value; }
        }

        public string BackColor
        {
            get { return this.color; }
            set { this.color = value; }
        }

        public string Header
        {
            get { return this.header; }
            set { this.header = value; }
        }

        public string Footer
        {
            get { return this.footer; }
            set { this.footer = value; }
        }

        public string FormBackColor
        {
            get { return this.formcolor; }
            set { this.formcolor = value; }
        }
        #endregion
    }
}